﻿using System;

namespace TopoViewer
{
    public struct Transformation
    {
        public double xScale, yScale, xDelta, yDelta;

        public SRect Transform(GRect world)
        {
            SRect screen;
            screen.left = (int)Math.Round(world.west * xScale + xDelta);
            screen.right = (int)Math.Round(world.east * xScale + xDelta);
            screen.top = (int)Math.Round(world.north * yScale + yDelta);
            screen.bottom = (int)Math.Round(world.south * yScale + yDelta);

            return screen;
        }
    };
}
